package com.greensam.pixelengine.pojo.emuns;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Ma Chengrui
 * @since 2025/8/1 9:59
 */
@Getter
@AllArgsConstructor
public enum SpaceTypeEnum {

    PRIVATE(0, "私有"),
    TEAM(1, "团队"),
    ;

    private final int value;

    private final String desc;

    /**
     * 根据value获取枚举
     */
    public static SpaceTypeEnum getByValue(int value) {
        for (SpaceTypeEnum spaceLevelEnum : values()) {
            if (spaceLevelEnum.value == value) {
                return spaceLevelEnum;
            }
        }
        return null;
    }
}
